<oc-dialog oc-dialog-title="公共元件编辑器" oc-dialog-switch="MS"
	oc-dialog-icon="object">
	<div ng-controller="ObjectEditor" class="grid">
		<nav class="oc-toolbar" style="border-bottom:1px solid #aaa;">
			<button class="ico add" title="添加" oc-dialog-open="{
				name:'object/update',
				data: {
					objectList: object.list,
					selected: objectList.selected,
					edit: false,
					refresh: doRefresh
				}
			}"></button>
			<button class="ico delete" title="删除" ng-click="deleteObject()"></button><hr/>
			<button class="ico refresh" title="刷新" ng-click="clearSearch()"></button>
			<input type="text" ng-model="query"/>
			<button class="ico search" ng-click="search()"></button><hr/>
			<button class="ico trash" oc-alert-open="trashAllObject"></button>
		</nav>
		<oc-list
			oc-list-data="object.list"
			oc-list-visit="objectList.visitFn"
			oc-list-refresh="refresh"
			oc-list-selected="objectList.selected"
			style="bottom:2rem;right:0;left:0;top:1.5rem;
				border:none;border-bottom:1px solid #aaa;">
			<field key="name" title="变量名" width="150"></field>
			<field key="cssPath" title="值" width="300"></field>
		</oc-list>
        <p style="bottom:0.3rem;left:0.3rem;">共 <b>{{object.list.length}}</b>个</p>
        <button style="right:0.3rem;bottom:0.3rem;" ng-click="save()">保存</button>
	</div>
</oc-dialog>
